package com.swx.tio;
import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

import org.apache.log4j.Logger;
public class work03 {
	private static final Logger logger = Logger.getLogger(work03.class);

	public static void main(String[] args) {
		String path = "d:\\D-1.wmv";
		String path2 = "f:\\aaa.wmv";
		try {
			InputStream is = new FileInputStream(path);
			BufferedInputStream in = new BufferedInputStream(is);
			OutputStream out = new FileOutputStream(path2);
			new FileOutputStream(path2);
			byte[] b = new byte[4096];
			int len;
			while((len=in.read(b))!=-1){
				out.write(b,0,len);
			}
		} catch (FileNotFoundException e) {
			logger.error(e);
		} catch (IOException e) {
			logger.error(e);
		}
		System.out.println("over");

	}
}
